package com.usian.admin.feign;

import com.usian.model.article.pojo.ApArticle;
import com.usian.model.article.pojo.ApArticleConfig;
import com.usian.model.article.pojo.ApArticleContent;
import com.usian.model.article.pojo.ApAuthor;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient("leadnews-article")
public interface ArticleFeign {
    @GetMapping("/article/api/v1/findById/{id}")
    public ApAuthor findByUserId(@PathVariable("id") Integer id);

    @PostMapping("/article/api/v1/article/saveApArticle")
    public ResponseResult saveApArticle(ApArticle apArticle);

    @PostMapping("/article/api/v1/article/article_config/save")
    ResponseResult saveApArticleConfig(ApArticleConfig apArticleConfig);

    @PostMapping("/article/api/v1/article/article_content/save")
    ResponseResult saveApArticleContent(ApArticleContent apArticleContent);
}
